﻿

using System;
using System.Collections.Generic;
using System.Text;
#if !NETCOREAPP2_0
using Microsoft.Win32;
#endif

namespace SAM.Framework.Machine
{
#if !NETCOREAPP2_0
    public interface IRegistryProvider
    {
        /// <summary>
        /// 删除注册表中指定项
        /// </summary>
        /// <param name="name">项名称</param>
        void DeleteRegistry(RegistryKey root, string subkey, string name);
        /// <summary>
        /// 获取注册表中某项的值
        /// </summary>
        /// <param name="root">位置</param>
        /// <param name="subkey">子key</param>
        /// <param name="name">项名称</param>
        /// <returns></returns>
        string GetRegistryData(RegistryKey root, string subkey, string name);
        /// <summary>
        /// 设置注册表中某项的值
        /// </summary>
        /// <param name="root"></param>
        /// <param name="subkey"></param>
        /// <param name="name"></param>
        /// <param name="value"></param>
        void SetRegistryData(RegistryKey root, string subkey, string name, string value);
        /// <summary>
        /// 绑定指定的name是存在
        /// </summary>
        /// <param name="root"></param>
        /// <param name="subkey"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        bool IsRegistryExist(RegistryKey root, string subkey, string name);

    }
#endif
}
